<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
</head>
<body>
    <tbody>
    <form action="" method="POST">
        {{ error }}
            <tr>
                <p>名字：<input type="text" name="stuname" value="{{ obj.stu_name }}"></p>
                <p>
                    {% if obj.gender %}
                        男:<input type="radio" name="gender" value="1" checked/>
                        女:<input type="radio" name="gender" value="0" />
                    {% else %}
                        男:<input type="radio" name="gender" value="1" />
                        女:<input type="radio" name="gender" value="0" checked/>
                    {% endif %}
                </p>
                <p>班级：
                    <select name="grade">
                     {% for foo in grade_list %}
                         {% if obj.grade_id == foo.grade_id %}
                            <option value="{{ foo.grade_id }}" selected>{{ foo.grade_name }}</option>
                         {% else %}
                            <option value="{{ foo.grade_id }}">{{ foo.grade_name }}</option>
                         {% endif %}
                     {% endfor %}
                    </select>
                </p>
                <p>学院：
                    <select name="college">
                        {% for college in college_list %}
                            {% if obj.collage_id == college.coll_id %}
                            <option value="{{ college.coll_id }}" selected> {{ college.coll_name }}</option>
                            {% else %}
                            <option value="{{ college.coll_id }}" > {{ college.coll_name }}</option>
                            {% endif %}
                        {% endfor %}
                    </select>
                </p>
                <input type="submit" value="提交">
            </tr>
        </form>
    </tbody>
</body>
</html>